<template>
  <section class="list-diary">
    <div class="inner">
      <simple-title :title="'评论列表'" :show="false"></simple-title>
      <div class="content" >
        <!--<li v-for="i in list" :key="i.id">-->
          <common-item :list="list" @clickSearch="clickSearch"></common-item>
        <!--</li>-->
      </div>
    </div>
  </section>
</template>

<script>
import SimpleTitle from '@/components/Title/SimpleTitle'
import CommonItem from '../../../components/ListItem/CommonItem'
export default {
  name: 'DiaryList',
  components: {
      SimpleTitle,
      CommonItem
  },
   data () {
      return {
         list:[]
      }
   },
    created () {
      this.getinfo()
    },
    methods: {
        clickSearch (text) {
            this.getinfo()
        },
        getinfo () {
            let _this = this
            _this.$post('/api/Diary/DiaryEvaluateAdmin',
                {
                    token:_this.$token,
                },function (res) {
                    res.data.forEach(function (i) {
                        if(i.count>0){
                            _this.list.push(i)
                        }
                    })
                    console.log(_this.list)
                },function (err,errmsg,errcode) {
                    _this.$message.error(errmsg);

                }
            )

        }
    }
}
</script>

<style lang="less" scoped>
  @import "../../../style/style.less";
  .list-diary {
    border: 1px solid @border-color;
    padding: 15px;
    .content {
      /*padding-top: 15px;*/
    }
  }
</style>
